<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>后台管理系统</title>
<js href="__PUBLIC__/Js/Jquery/jquery-1.4.4.min.js" />
<script language="javascript" type="text/javascript" src="../Public/js/cal.js"></script>
<link href="../Public/admin/css/golbal.css" rel="stylesheet" type="text/css" />
<link href="../Public/admin/css/member.css" rel="stylesheet" type="text/css" />
<link href="../Public/css/cal.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="tittle">
<span>气象网管理中心—-文档类资源共享</span>
</div>

<div class="infor">
<form action="{:U('Share/articles')}" method="post">
<img src="../Public/admin/images/zoom.jpg" />
<p><span>文档分类 </span>
<select name='type1' id="tid1">
<eq name='type' value='1'>
<option value=1 selected>文章资源</option><else/>
<option value=1 >文章资源</option></eq>

<eq name='type' value='2'>
<option value=2 selected>图书资源</option><else/>
<option value=2 >图书资源</option></eq>

<eq name='type' value='3'>
<option value=3 selected>知识题资源</option><else/>
<option value=3 >知识题资源</option></eq>

</select></p>
<p><span>同步时间 </span>
<empty name='tftime'>
<input type="text" id='tftime' name='tftime' value=""/><else/>
<input type="text" id='tftime' name='tftime' value="{$tftime|date='Y-m-d',###}"/>
</empty>
至
<empty name='tttime'>
<input type="text" id='tttime' name='tttime' value=""/><else/>
<input type="text" id='tttime' name='tttime' value="{$tttime|date='Y-m-d',###}"/>
</empty>
</p>

<empty name='maxtime'>
<span>最新上传时间:没有同步</span><else/>
<span>最新上传时间{$maxtime|date='Y-m-d H:i:s',###}</span>
</empty>
<input class="sear" name='sub2' type="submit" value="同步" />
</form>
</div>

<div class="infor">
<form action="{:U('Share/articles')}" method="post">
<img src="../Public/admin/images/zoom.jpg" />
<p><span>文档分类 </span>
<select name='type1' id="tid1">
<eq name='type' value='1'>
<option value=1 selected>文章资源</option>
<else/>
<option value=1 >文章资源</option>
</eq>

<eq name='type' value='2'>
<option value=2 selected>图书资源</option>
<else/>
<option value=2 >图书资源</option>
</eq>

<eq name='type' value='3'>
<option value=3 selected>知识题资源</option>
<else/>
<option value=3 >知识题资源</option>
</eq>
</select></p>
<p><span>编号</span>
<input type="text" id='lmaxs' name='Num' value=""/>
</p>
<p><span>上传时间 </span>
<empty name='ftime'>
<input type="text" id='ftime' name='ftime' value=""/><else/>
<input type="text" id='ftime' name='ftime' value="{$ftime|date='Y-m-d',###}"/>
</empty>
</p>
<p><span>至 </span>
<empty name='ttime'>
<input type="text" id='ttime' name='ttime' value=""/><else/>
<input type="text" id='ttime' name='ttime' value="{$ttime|date='Y-m-d',###}"/>
</empty>
</p>
<input class="sear" name='sub1' type="submit" value="搜索" />
</form>
</div>

<div class="detab">
<table cellpadding="0" cellspacing="0" border="0">
<tbody>
<tr class="thi">
<th width="40"><input type="checkbox" class="checkall"></th>
<th width="60">编号</th>
<th width="200">标题</th>
<th width="95">资源分类</th>
<th width="150">上传时间</th>
<th width="175">共享发布时间</th>
<!-- <th width="95">注册日期</th> -->
<th width="100">操作</th>
</tr>
<volist id="vo" name="list">
<tr>
<td><input type="checkbox" value="{$vo.id}" class="checkitem"></td>
<td>{$vo.code}</td>
<td>{$vo.title}</td>
<td>{$vo.catename}</td>
<td>{$vo.uploadtime|date='Y-m-d',###}</td>
<neq name="vo['sharetime']" value="0">
<td>{$vo.sharetime|date='Y-m-d',###}</td>
<else/>
<td></td>
</neq>
<!-- <td>{$vo.regtime|date="Y-m-d",###}</td> -->
<td class="last_bt"><a href="javascript:void(0);" onclick="lookarticle('{$vo.url}')" class="look">查看</a><a href="javascript:void(0);" onclick="sendarticle('{$vo['uid']}');" class="move">发送</a></td>
</tr>
</volist>
</tbody>
</table>
</div>

<div style="float:left"><input class="formbtn batchButton" type="button" value="发布" name="id" uri="{:U('Share/sendarticle')}" /></div>
<div class="num">
{$page}
</div>
<div class="clear"></div>

<script type="text/javascript">

//搜索
$(function(){

	$('.checkall').click(function(){
		$('.checkitem').attr('checked',this.checked);
	});
	
	$('.batchButton').click(function(){
		if($('.checkitem:checked').length==0){
			alert('请选择一个共享资源!');
			return false;
		}
		
        var items = '';
        $('.checkitem:checked').each(function(){
            items += this.value + ',';
        });
        
        items = items.substr(0, (items.length - 1));
        /* 将选中的项通过post方式提交给指定的URI */
        var uri = $(this).attr('uri');
        var id = items;
     	
        $.post(uri,{id:id},function(res){
        	if(res!=0){
        		alert('已经发送!');
        	}else alert(res);
        });

	});

});
	
</script>
</body>
</html>
